﻿<h3><%= t :doithongtincanhan%></h3>
<div class="exer1_form">
<%= form_for(@user) do |f| %>
  <% if @user.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>

      <ul>
      <% @user.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label "#{t :ho}" %><br />
    <%= f.text_field :firstName %>
  </div>

  <div class="field">
    <%= f.label "#{t :ten}" %><br />
    <%= f.text_field :lastName %>
  </div>
  <div class="field">
    <%= f.label 'Email' %><br />
    <%= f.text_field :email %>
  </div>
  <div class="field">
    <%= f.label "#{t :matkhau}" %><br />
    <%= f.password_field :password %>
  </div>
  <div class="field">
    <%= f.label "#{t :xacnhanmatkhau}" %><br />
    <%= f.password_field :password_confirmation %>
  </div>

  <div class="field">
    <%= f.label "#{t :sdt}" %><br />
    <%= f.text_field :phone %>
  </div>

  <% if((session[:user_id])!=nil) %>
      <% @user = User.find(session[:user_id]) %>
      <% if(@user.GroupUserId==10) %>
        <div class="field">
          <% @us= Groupuser.all %>
        <%= f.label :GroupUserId, "#{t :nhom}" %>
        <%= f.select :GroupUserId, @us.map {|p| [ p.GroupId, p.GroupId ] } , { :include_blank => true } %> 
        <%= t :groupuserid%>
        </div>
      <% end %>
  <% end %>

  <div class="actions">
    <%= f.submit "#{t :capnhat}"%>
  </div>
<% end %>
</div>
